﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;
using System.Data;

namespace DAL
{
  public  class YuangongDAL
    {
      public static bool AddYuangong(Yuangong model)
      {
          return true;


      }
      //登录查询
      public static DataTable SelectZH(Yuangong model)
      {
          string sql = string.Format("select * from dbo.Yuangong where AdministratorYH='{0}' and Password='{1}'", model.AdministratorYH, model.Password);
         return DBHelper.Instance().GetDataTableBySql(sql);
      }
      

      //注册
      public static bool Zc(Yuangong model)
      {
          string sql = string.Format("insert into dbo.Yuangong values('{0}','{1}','{2}','0.00','{3}','{4}','{5}')", model.AdministratorName, model.AdministratorYH, model.Password, model.Address, model.Phone, model.Toxiang);
          return DBHelper.Instance().ExcuteSql(sql);
      }
     
    }
}
